package gl.android.jxzs.socket;

import java.io.DataOutputStream;
import java.io.IOException;

public class MessageSender {
	DataOutputStream dos;

	public MessageSender(DataOutputStream dos) {
		this.dos = dos;
	}

	public void send(byte[] packet) {
		try {
			write(dos, packet);
		} catch (IOException e) {
			e.printStackTrace();
		}

	}

	public static void write(DataOutputStream dos, byte[] packet)
			throws IOException {
		dos.write(packet);
		dos.flush();
		System.out.print(" \n send over");
	}


}
